/**
 * 
 */
package cn.agiledata.bank.common.dao;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import cn.agiledata.bank.hibernateBean.RandomCode;

public class RandomCodeDAO extends HibernateDaoSupport implements IRandomCodeDAO {
	
	/* (non-Javadoc)
	 * @see cn.agiledata.bank.common.dao.IRandomCodeDAO#findRandomCode(java.lang.String)
	 */
	public RandomCode findRandomCode (String code) {
		return (RandomCode) this.getHibernateTemplate().get(RandomCode.class, code) ;
	}
	
	/* (non-Javadoc)
	 * @see cn.agiledata.bank.common.dao.IRandomCodeDAO#saveRandomCode(java.lang.String)
	 */
	public void saveRandomCode (String code) {
		this.getHibernateTemplate().save(new RandomCode(code)) ;
	}
	
}